﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace Sbook.Data
{
    public class DeliveryInfo
    {
        private string deliveryId;

        public string DeliveryId
        {
            get { return deliveryId; }
            set { deliveryId = value; }
        }

        private string deliveryCode;

        public string DeliveryCode
        {
            get { return deliveryCode; }
            set { deliveryCode = value; }
        }

        private string deliveryDate;

        public string DeliveryDate
        {
            get { return deliveryDate; }
            set { deliveryDate = value; }
        }
        public string CustId { get; set; }
        private string deliveryPrice;

        public string DeliveryPrice
        {
            get { return deliveryPrice; }
            set { deliveryPrice = value; }
        }

        private string deliveryLocation;

        public string DeliveryLocation
        {
            get { return deliveryLocation; }
            set { deliveryLocation = value; }
        }

        private string deliveryShippingPoint;

        public string DeliveryShippingPoint
        {
            get { return deliveryShippingPoint; }
            set { deliveryShippingPoint = value; }
        }

        private string deliveryStatus;

        public string DeliveryStatus
        {
            get { return deliveryStatus; }
            set { deliveryStatus = value; }
        }

        private string uId;

        public string UId
        {
            get { return uId; }
            set { uId = value; }
        }

        private string payId;

        public string PayId
        {
            get { return payId; }
            set { payId = value; }
        }

        private string deliveryName;

        public string DeliveryName
        {
            get { return deliveryName; }
            set { deliveryName = value; }
        }

        private string deliveryAdd;

        public string DeliveryAdd
        {
            get { return deliveryAdd; }
            set { deliveryAdd = value; }
        }

        private string deliveryPhone;

        public string DeliveryPhone
        {
            get { return deliveryPhone; }
            set { deliveryPhone = value; }
        }

        private string deliveryEmail;

        public string DeliveryEmail
        {
            get { return deliveryEmail; }
            set { deliveryEmail = value; }
        }

        private string deliveryClass;

        public string DeliveryClass
        {
            get { return deliveryClass; }
            set { deliveryClass = value; }
        }

        private string deliveryUniversity;

        public string DeliveryUniversity
        {
            get { return deliveryUniversity; }
            set { deliveryUniversity = value; }
        }

        private string deliveryApprovedDate;

        public string DeliveryApprovedDate
        {
            get { return deliveryApprovedDate; }
            set { deliveryApprovedDate = value; }
        }
        

        public DeliveryInfo DeliveryIDataReader(IDataReader dr)
        {
            Data.DeliveryInfo obj = new Data.DeliveryInfo();
            obj.DeliveryId = (dr["DeliveryId"] is DBNull) ? string.Empty : dr["DeliveryId"].ToString();
            obj.DeliveryCode = (dr["DeliveryCode"] is DBNull) ? string.Empty : dr["DeliveryCode"].ToString();
            obj.DeliveryDate = (dr["DeliveryDate"] is DBNull) ? string.Empty : dr["DeliveryDate"].ToString();
            obj.CustId = (dr["CustId"] is DBNull) ? string.Empty : dr["CustId"].ToString();
            obj.DeliveryShippingPoint = (dr["DeliveryShippingPoint"] is DBNull) ? string.Empty : dr["DeliveryShippingPoint"].ToString();
            obj.DeliveryStatus = (dr["DeliveryStatus"] is DBNull) ? string.Empty : dr["DeliveryStatus"].ToString();
            obj.UId = (dr["UId"] is DBNull) ? string.Empty : dr["UId"].ToString();
            obj.PayId = (dr["PaymentId"] is DBNull) ? string.Empty : dr["PaymentId"].ToString();
            obj.DeliveryPrice = (dr["DeliveryPrice"] is DBNull) ? string.Empty : dr["DeliveryPrice"].ToString();
            obj.DeliveryName = (dr["DeliveryName"] is DBNull) ? string.Empty : dr["DeliveryName"].ToString();
            obj.DeliveryAdd = (dr["DeliveryAdd"] is DBNull) ? string.Empty : dr["DeliveryAdd"].ToString();
            obj.DeliveryPhone = (dr["DeliveryPhone"] is DBNull) ? string.Empty : dr["DeliveryPhone"].ToString();
            obj.DeliveryEmail = (dr["DeliveryEmail"] is DBNull) ? string.Empty : dr["DeliveryEmail"].ToString();
            obj.DeliveryClass = (dr["DeliveryClass"] is DBNull) ? string.Empty : dr["DeliveryClass"].ToString();
            obj.DeliveryUniversity = (dr["DeliveryUniversity"] is DBNull) ? string.Empty : dr["DeliveryUniversity"].ToString();
            obj.DeliveryApprovedDate = (dr["DeliveryApprovedDate"] is DBNull) ? string.Empty : dr["DeliveryApprovedDate"].ToString();
            return obj;
        }
    }
}